import Login from '../pages/login'
import Home from '../pages/home'
import Index from '../pages/index'
import Event from '../pages/event'
import Mine from '../pages/mine'
import userInfo from '../pages/mine/userInfo'
import aboutUs from '../pages/mine/aboutUs'
import Serve from '../pages/serve'
import Page404 from '../pages/page404'
import noticeDetail from '../pages/index/noticeDetail'
import secretPolicy from '../pages/mine/secretPolicy'
import subServe from '../pages/serve/subServe'
import subServeDetail from '../pages/serve/subServeDetail'
import sendback from '../pages/serve/sendback'
import carryServe from '../pages/serve/carryServe'
const routes = [{
		name: 'login',
		path: '/login',
		component: Login,
		meta: {
			name_zh: '登录',
		}
	},
	{
		path: '/home',
		component: Home,
		children: [
			{
				name: 'index',
				path: '/index',
				component: Index,
				meta: {
					name_zh: '首页',
					tab:'/index'
				}
			}, 
			{
				name: 'event',
				path: '/event',
				component: Event,
				meta: {
					name_zh: '应急事件',
					tab:'/event'
				}
			}, 
			{
				name: 'serve',
				path: '/serve',
				component: Serve,
				meta: {
					name_zh: '应急服务',
					tab:'/serve'
				}
			},
			{
				name: 'subServe',
				path: '/subServe',
				component: subServe,
				meta: {
					name_zh: '子任务列表',
					tab:'/serve'
				}
			},
			{
				name: 'subServeDetail',
				path: '/subServeDetail',
				component: subServeDetail,
				meta: {
					name_zh: '子任务详情',
					tab:'/serve'
				}
			},
			{
				name: 'sendback',
				path: '/sendback',
				component: sendback,
				meta: {
					name_zh: '退回子任务',
					tab:'/serve'
				}
			},
			{
				name: 'carryServe',
				path: '/carryServe',
				component: carryServe,
				meta: {
					name_zh: '执行子任务',
					tab:'/serve'
				}
			},
			{
				name: 'mine',
				path: '/mine',
				component: Mine,
				meta: {
					name_zh: '个人中心',
					tab:'/mine'
				}
			}, 
			{
				name: 'mineUserInfo',
				path: '/mine/userInfo',
				component: userInfo,
				meta: {
					name_zh: '个人信息',
					tab:'/mine'
				}
			},
			{
				name:"mineSecretPolicy",
				path:"/mine/secretPolicy",
				component: secretPolicy,
				meta: {
					name_zh: '隐私政策',
					tab:'/mine'
				}
			},
			{
				name: 'mineAboutUs',
				path: '/mine/aboutUs',
				component: aboutUs,
				meta: {
					name_zh: '关于我们',
					tab:'/mine'
				}
			},
			{
				path: '/',
				redirect: '/index'
			}
		]
	},
	{
		name: "noticeDetail",
		path:"/noticeDetail",
		component: noticeDetail,
		meta: {
			name_zh: '公告详情',
		}
	},
	{
		name:"secretPolicy",
		path:"/secretPolicy",
		component: secretPolicy,
		meta: {
			name_zh: '隐私政策',
			tab:'/mine'
		}
	},
	{
		name: 'aboutUs',
		path: '/aboutUs',
		component: aboutUs,
		meta: {
			name_zh: '关于我们',
			tab:'/mine'
		}
	},
	{
		path: '/',
		redirect: 'login'
	},
	{
		path: '*',
		component: Page404,
		meta: {
			name_zh: '404',
		}
	}
]

export default routes